<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Dessert House - 系统管理员</title>
<link href="/ChristineCake/css/Management_List_Button.css"
	rel="stylesheet" type="text/css" />
</head>

<body>

	<div id="header">
		<div id="logo">
			<img src="/ChristineCake/image/logo.png" alt="logo" width="100%"
				height="100%" />
		</div>
		<div id="logout" align="right">
			<a href="/ChristineCake/jsp/LogIn.jsp">登出</a>
		</div>
	</div>

	<div id="menu">
		<ul>
			<li><a href="/ChristineCake/MemberManagementServlet">人员管理 </a></li>
			<li><a href="/ChristineCake/ShopManagementServlet">店面管理 </a></li>
			<li><a href="/ChristineCake/MemberDiscountManagementServlet">会员优惠管理</a></li>
		</ul>
	</div>

	<div id="panel">
		<div id="list">
			<ul>
				<li id="listhead"><b>请选择人员类型</b></li>
				<li><a href="/ChristineCake/MemberManagementServlet">会员管理</a></li>
				<li><a href="/ChristineCake/SalerManagementServlet">店员管理</a></li>
				<li><a href="/ChristineCake/ManagerManagementServlet">经理管理</a></li>
			</ul>
		</div>

		<jsp:useBean id="salerList" type="bean.SalerListBean" scope="request" />
		<jsp:useBean id="saler" class="model.Saler" scope="page" />

		<div id="content">
			<table>
				<tr>
					<td>
						<div id="scroll">
							<table>
								<tr>
									<th>姓名</th>
									<th>性别</th>
									<th>年龄</th>
									<th>店面</th>
									<th>修改</th>
									<th>删除</th>
								</tr>
								<%
									for (int i = 0; i < salerList.getSalerList().size(); i++) {
										pageContext.setAttribute("saler", salerList.getSaler(i));
								%>
								<tr>
									<td><jsp:getProperty name="saler" property="name" /></td>
									<td>
										<%
											if (salerList.getSaler(i).getGender().equals("male")) {
													out.println("男");
												} else {
													out.println("女");
												}
										%>
									</td>
									<td><jsp:getProperty name="saler" property="age" /></td>
									<td><jsp:getProperty name="saler" property="shop" /></td>
									<td><a
										href="/ChristineCake/ModifySalerServlet?name=<jsp:getProperty name="saler" property="name" />">修改</a></td>
									<td><a
										href="/ChristineCake/DeleteSalerServlet?name=<jsp:getProperty name="saler" property="name" />">删除</a></td>
								</tr>
								<%
									}
								%>
							</table>
						</div>
					</td>
				</tr>
			</table>
			<br />
			<form method="GET" action="/ChristineCake/AddSalerServlet">
				<input type="submit" name="add" value="新增" size="20%" class="button">
			</form>
		</div>
	</div>

	<hr />

	<div id="footer">
		<p>©南京大学软件学院 李冰洁</p>
	</div>

</body>

</html>